Skip to content

Show truncation indicator in array display#7072

Merged
robert3005 merged 2 commits intodevelopfrom
mitko/display/truncation-indicator
Mar 20, 2026
Merged

Show truncation indicator in array display#7072
robert3005 merged 2 commits intodevelopfrom
mitko/display/truncation-indicator

Conversation

@dimitarvdimitrov
Copy link
Contributor

When displaying array values that exceed the display limit (16), we now show ... at the end instead of silently truncating. Makes it obvious the output is incomplete.

@dimitarvdimitrov dimitarvdimitrov added changelog/skip Do not list PR in the changelog changelog/fix A bug fix and removed changelog/fix A bug fix labels Mar 19, 2026
@dimitarvdimitrov dimitarvdimitrov force-pushed the mitko/display/truncation-indicator branch from 6378a6d to 1c79cc4 Compare March 19, 2026 18:01
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates array value display so that when the displayed values are truncated (default limit 16), the output visibly indicates truncation by appending an ellipsis.

Changes:

  • Update scalar array display formatting to append ... when output is truncated.
  • Update DisplayOptions docs to mention the default truncation behavior.
  • Add a unit test asserting the new truncation indicator behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dimitarvdimitrov dimitarvdimitrov force-pushed the mitko/display/truncation-indicator branch from 1c79cc4 to 0e2ed56 Compare March 19, 2026 18:13
@dimitarvdimitrov dimitarvdimitrov marked this pull request as ready for review March 19, 2026 18:21
Copy link
Contributor

@joseph-isaacs joseph-isaacs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to add custom trunc len. but this can be a follow up

Copy link
Contributor

@joseph-isaacs joseph-isaacs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be nice to include the last few values too?

@robert3005
Copy link
Contributor

I have added the logic to print trailer as well. We now print LIMIT - 3, ..., LAST 3 items when display is truncated

@robert3005 robert3005 enabled auto-merge (squash) March 20, 2026 05:35
@codspeed-hq
Copy link

codspeed-hq bot commented Mar 20, 2026

Merging this PR will improve performance by 14.12%

⚡ 2 improved benchmarks
✅ 1014 untouched benchmarks
⏩ 1522 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation bench_many_nulls[0.5] 360.6 µs 324.4 µs +11.16%
Simulation bench_many_nulls[0.9] 528.6 µs 463.2 µs +14.12%

Comparing mitko/display/truncation-indicator (0605800) with develop (236d5cc)

Open in CodSpeed

Footnotes

  1. 1522 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@dimitarvdimitrov dimitarvdimitrov force-pushed the mitko/display/truncation-indicator branch from c6d0470 to a4e608c Compare March 20, 2026 11:07
Signed-off-by: Dimitar Dimitrov <dimitar@spiraldb.com>

trailer

Signed-off-by: Robert Kruszewski <github@robertk.io>

skip: clean up ci prebuild image usage (#7025)

Can

Simplify

Signed-off-by: Dimitar Dimitrov <dimitar@spiraldb.com>

repeat_n instead of take

Signed-off-by: Dimitar Dimitrov <dimitar@spiraldb.com>
@dimitarvdimitrov dimitarvdimitrov force-pushed the mitko/display/truncation-indicator branch from a4e608c to 3443a26 Compare March 20, 2026 11:08
Signed-off-by: Dimitar Dimitrov <dimitar@spiraldb.com>
@robert3005 robert3005 merged commit b1ab304 into develop Mar 20, 2026
55 checks passed
@robert3005 robert3005 deleted the mitko/display/truncation-indicator branch March 20, 2026 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/skip Do not list PR in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants